import service from "@/utils/fetch";
const post = {
  //获取商户列表
  getTenantList(params) {
    return service({
      method: "get",
      params,
      url: "/api/tenant"
    });
  },

  //获取商户详情
  tenantInfo(id) {
    return service({
      method: "get",
      url: `/api/tenant/${id}`
    });
  },

  // 删除商户表
  deleteTenant(ids) {
    return service({
      method: "delete",
      url: `/api/tenant/`,
      data: ids
    });
  },

  // 商户表修改分润比例
  updateCommissionRate(params) {
    return service({
      method: "post",
      url: `/api/tenant/updateCommissionRate`,
      data: params
    });
  },

  // 查询商户续费规则列表
  tenantRenewRule(params) {
    return service({
      method: "get",
      params,
      url: "/api/tenantRenewRule/"
    });
  },

  // 停用商户表
  disableTenant(id) {
    return service({
      method: "post",
      url: `/api/tenant/disable/${id}`
    });
  },

  // 启用商户表
  enableTenant(id) {
    return service({
      method: "post",
      url: `/api/tenant/enable/${id}`
    });
  },

  // 重置商户密码
  tenantResetPass(params) {
    return service({
      method: "post",
      url: `/api/tenant/resetPass`,
      data: params
    });
  }
};

export default post;
